//
//  KATRadioButtonItem.m
//  KATFramework
//
//  Created by Kantice on 16/3/14.
//  Copyright © 2016年 KatApp. All rights reserved.
//

#import "KATRadioButtonItem.h"

@implementation KATRadioButtonItem


+ (instancetype)itemWithLabel:(NSString *)label andButton:(KATButtonType)button
{
    KATRadioButtonItem *item=[[[self alloc] init] autorelease];
    
    if(label)
    {
        item.hasLabel=YES;
        item.label=label;
    }
    else
    {
        item.hasLabel=NO;
        item.label=nil;
    }
    
    if(button!=KATButtonTypeNone)
    {
        item.hasButton=YES;
        item.button=button;
    }
    else
    {
        item.hasButton=NO;
        item.button=0;
    }
    
    item.index=0;
    item.tag=0;
    item.message=nil;
    item.object=nil;
    item.isButtonOnRight=NO;
    
    return item;
}




- (void)dealloc
{
    [_label release];
    [_message release];
    [_object release];
    
    [super dealloc];
}


@end
